package com.snda.relation.service.relation.biz.service;

import com.snda.commons.servicegate.annotations.Endpoint;
import com.snda.commons.servicegate.annotations.Param;
import com.snda.commons.servicegate.annotations.Service;
import com.snda.commons.servicegate.validation.Number;
import com.snda.relation.service.exception.ServiceInvocationException;
import com.snda.relation.service.opensocial.GetResponse;
import com.snda.relation.service.opensocial.UpdateResponse;
import com.snda.relation.service.relation.biz.domain.Superstar;

/**
 * 
 * @author yangjiandong
 * @since 2010-04-03
 * @file GroupService.java
 */
@Service("SuperStarService")
public interface SuperStarService {
	/**
	 * get an object of super star
	 * 
	 * @param sdid
	 *            superstar's sdid
	 * @return superstar
	 */
	@Endpoint(alias = "getSuperStar")
	public GetResponse<Superstar> getSuperStar(@Param("sdid") @Number(min=1)Long sdid);

	/**
	 * list all the superstar
	 * 
	 * @return the super star list
	 * @throws ServiceInvocationException
	 */
	@Endpoint(alias = "getAllSuperStar")
	public GetResponse<Superstar> getAllSuperStar()
			throws ServiceInvocationException;

	/**
	 * add a super star to the super star list
	 * 
	 * @param sdid
	 *            sdid of a super star
	 * @param fansNumber
	 *            the fans number of a super star
	 * @return update response
	 * @throws ServiceInvocationException
	 */
	@Endpoint(alias = "addSuperstar")
	public UpdateResponse addSuperstar(@Param("sdid") @Number(min=1)Long sdid,
			@Param("fansNumber") Integer fansNumber)
			throws ServiceInvocationException;

	/**
	 * update the fans number of a specific super star
	 * 
	 * @param sdid
	 * @param fansNumber
	 * @return UpdateResponse
	 * @throws ServiceInvocationException
	 */
	@Endpoint(alias = "updateFansNumber")
	public UpdateResponse updateFansNumber(@Param("sdid") @Number(min=1)Long sdid,
			@Param("fansNumber") Integer fansNumber)
			throws ServiceInvocationException;

	/**
	 * delete a super star record from the list
	 * @param sdid
	 * @return UpdateResponse
	 * @throws ServiceInvocationException
	 */
	@Endpoint(alias = "deleteSuperstar")
	public UpdateResponse deleteSuperstar(@Param("sdid") @Number(min=1)Long sdid)
			throws ServiceInvocationException;
}
